/**
 * Utility functions for ArenaNext monaco integration
 */

/**
 * Shows a small notification message
 * @param {string} message - The message to display
 */
export function showNotification(message) {
  const notification = document.createElement("div");
  notification.textContent = message;
  notification.style.cssText = `
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: rgba(40, 42, 54, 0.9);
    color: #f8f8f2;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-left: 4px solid #6272a4;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.3s, opacity 0.3s;
  `;
  document.body.appendChild(notification);

  // Show with animation
  setTimeout(() => {
    notification.style.transform = "translateY(0)";
    notification.style.opacity = "1";
  }, 10);

  // Remove after animation
  setTimeout(() => {
    notification.style.transform = "translateY(20px)";
    notification.style.opacity = "0";

    // Remove from DOM after animation completes
    setTimeout(() => {
      if (document.body.contains(notification)) {
        document.body.removeChild(notification);
      }
    }, 300);
  }, 2000);
}
